package fun.sssdnsy.model;

import java.util.ArrayList;
import java.util.List;

public class RichContent {
    private String text;
    private List<ImageData> images = new ArrayList<>();

    // 图片数据内部类
    public static class ImageData {
        private int position;
        private String base64;
        private double width;

        // Getter和Setter方法
        public int getPosition() {
            return position;
        }

        public void setPosition(int position) {
            this.position = position;
        }

        public String getBase64() {
            return base64;
        }

        public void setBase64(String base64) {
            this.base64 = base64;
        }

        public double getWidth() {
            return width;
        }

        public void setWidth(double width) {
            this.width = width;
        }
    }

    // RichContent的Getter和Setter
    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public List<ImageData> getImages() {
        return images;
    }

    public void setImages(List<ImageData> images) {
        this.images = images;
    }

    // 添加图片的便捷方法
    public void addImage(ImageData image) {
        this.images.add(image);
    }
}
